package com.hb.trans.mvp.model

import com.basiclib.base.BaseModel
import com.hb.trans.api.EndPoints
import com.hb.trans.api.TRANS_SERVER_MY_PATH
import com.hb.trans.bean.Base
import com.hb.trans.bean.Save
import com.hb.trans.mvp.contract.SignContract
import io.reactivex.Observable
import javax.inject.Inject

class SignModel @Inject constructor(var api: EndPoints) : BaseModel(), SignContract.Model {

    override fun save(
        card_no: String,
        phone: String,
        user_name: String,
        car_type: String,
        inscode: String
    ): Observable<Base<Save>> {
        return api.save(
            "${TRANS_SERVER_MY_PATH}enroll/save",
            params = mutableMapOf(
                "card_no" to card_no,
                "phone" to phone,
                "user_name" to user_name,
                "car_type" to car_type,
                "inscode" to inscode
            )
        )
    }

}
